import fetch from '@/axios'

export function yprojectlist(params) {
  return fetch({
    url: '/admin/yready/y/c/yprojectlist',
    method: 'post',
    data: params
  })
}

export  function ylayoutdata(params) {
  return fetch({
    url: '/admin/yready/y/c/ylayoutdata',
    method: 'post',
    data: params
  })
}

export  function yplan(params) {
  return fetch({
    url: '/admin/yready/y/c/plan',
    method: 'post',
    data: params
  })
}
export  function ynow(params) {
  return fetch({
    url: '/admin/yready/y/c/now',
    method: 'post',
    data: params
  })
}
export  function ygetquotes(params) {
  return fetch({
    url: '/admin/yready/y/c/getQuotes',
    method: 'post',
    data: params
  })
}

export function savey(model,params) {
  if (!params) {
    params = {};
  }
  return fetch({
    url: '/admin/yready/y/c/savey/y'+model,
    method: 'post',
    data: params
  })
}

export function findy(model,params) {
  if (!params) {
    params = {};
  }
  return fetch({
    url: '/admin/yready/y/c/findy/y'+model,
    method: 'post',
    data: params
  })
}

export function dely(model,id) {
  var data = {};
  data["ids"] = id;
  return fetch({
    url: '/admin/yready/y/c/dely/y'+model,
    method: 'post',
    data: params
  })
}


export  function ymeeting(params) {
  return fetch({
    url: '/admin/yready/y/m/setCalendar',
    method: 'post',
    data: params
  })
}
export  function ymeetingset(params) {
  return fetch({
    url: '/admin/yready/y/setm/setCalendar',
    method: 'post',
    data: params
  })
}

export  function ymeetingajax(methods,params) {
  return fetch({
    url: '/admin/yready/y/setm/'+methods,
    method: 'post',
    data: params
  })
}
